/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    padding: 20px;
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    min-height: 100vh;
}

/* 标题样式 */
header {
    text-align: center;
    margin-bottom: 30px;
    padding: 20px 0;
    background-color: #4a6fa5;
    color: white;
    border-radius: 8px;
}

header h1 {
    font-size: 2.5em;
    margin-bottom: 10px;
}

header p {
    font-size: 1.2em;
    opacity: 0.9;
}

/* 聊天容器样式 */
.chat-container {
    margin-bottom: 30px;
    border: 1px solid #ddd;
    border-radius: 8px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

/* 聊天头部样式 */
.chat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-bottom: 1px solid #ddd;
}

.chat-header h2 {
    color: #4a6fa5;
    font-size: 1.5em;
}

.clear-btn {
    padding: 8px 15px;
    background-color: #dc3545;
    color: white;
    border: none;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.clear-btn:hover {
    background-color: #c82333;
}

/* 聊天消息区域样式 */
.chat-messages {
    height: 400px;
    overflow-y: auto;
    padding: 20px;
    background-color: #fafafa;
}

/* 消息气泡样式 */
.user-message,
.bot-message {
    margin-bottom: 15px;
    display: flex;
}

.user-message {
    justify-content: flex-end;
}

.bot-message {
    justify-content: flex-start;
}

.message-content {
    max-width: 70%;
    padding: 10px 15px;
    border-radius: 18px;
    word-wrap: break-word;
    position: relative;
}

.user-message .message-content {
    background-color: #dcf8c6;
    color: #333;
    border-bottom-right-radius: 5px;
}

.bot-message .message-content {
    background-color: #fff;
    color: #333;
    border: 1px solid #ddd;
    border-bottom-left-radius: 5px;
}

/* 聊天输入区域样式 */
.chat-input {
    display: flex;
    padding: 15px 20px;
    background-color: #f8f9fa;
    border-top: 1px solid #ddd;
}

#user-input {
    flex: 1;
    padding: 10px 15px;
    border: 1px solid #ddd;
    border-radius: 20px;
    font-size: 16px;
    outline: none;
    transition: border-color 0.3s;
}

#user-input:focus {
    border-color: #4a6fa5;
}

.send-btn {
    margin-left: 10px;
    padding: 10px 20px;
    background-color: #4a6fa5;
    color: white;
    border: none;
    border-radius: 20px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
}

.send-btn:hover {
    background-color: #3a5a8a;
}

/* 聊天信息区域样式 */
.chat-info {
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.chat-info h3 {
    color: #4a6fa5;
    margin-bottom: 15px;
    font-size: 1.3em;
}

.chat-info p {
    margin-bottom: 10px;
    color: #666;
}

.chat-info ul {
    list-style-type: none;
    padding-left: 0;
}

.chat-info li {
    padding: 5px 0;
    padding-left: 20px;
    position: relative;
    color: #666;
}

.chat-info li:before {
    content: '•';
    color: #4a6fa5;
    font-size: 1.5em;
    position: absolute;
    left: 0;
    top: -3px;
}

/* 滚动条样式 */
.chat-messages::-webkit-scrollbar {
    width: 8px;
}

.chat-messages::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb {
    background: #888;
    border-radius: 4px;
}

.chat-messages::-webkit-scrollbar-thumb:hover {
    background: #555;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 2em;
    }
    
    .chat-header {
        flex-direction: column;
        gap: 10px;
    }
    
    .chat-messages {
        height: 300px;
    }
    
    .message-content {
        max-width: 85%;
    }
    
    .chat-input {
        flex-direction: column;
        gap: 10px;
    }
    
    .send-btn {
        margin-left: 0;
    }
}